// 冒泡排序
void BubbleOrder()
{
const int nCount = 9;
int data[nCount] {3, 5, 9, 2, 8, 5, 7, 2, 1};
for (int i = 0; i < nCount; i++) {
for (int j = nCount - 1; j > i; j--) {
if(data[j] < data[j - 1])
{
Swap(data[j], data[j-1]);
}
}
}
for (int i = 0; i < nCount; i++) {
std::cout << data[i] << std::endl;
}
}